home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / a / asm_one / asm-onev1.25c.dms / in.adf / Release3.0 / Include3.0.lha / Include3.0 / libraries / amigaguide.h next >
Encoding:
C/C++ Source or Header  |  1992-09-24  |  6.8 KB  |  223 lines

  1. #ifndef LIBRARIES_AMIGAGUIDE_H
  2. #define LIBRARIES_AMIGAGUIDE_H
  3. /*
  4. **    $VER: amigaguide.h 39.3 (13.08.92)
  5. **    Includes Release 39.108
  6. **
  7. **    C prototypes. For use with 32 bit integers only.
  8. **
  9. **    (C) Copyright 1990-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif /* EXEC_TYPES_H */
  15.  
  16. #ifndef EXEC_LISTS_H
  17. #include <exec/lists.h>
  18. #endif /* EXEC_LISTS_H */
  19.  
  20. #ifndef EXEC_NODES_H
  21. #include <exec/nodes.h>
  22. #endif /* EXEC_NODES_H */
  23.  
  24. #ifndef EXEC_SEMAPHORES_H
  25. #include <exec/semaphores.h>
  26. #endif
  27.  
  28. #ifndef INTUITION_INTUITION_H
  29. #include <intuition/intuition.h>
  30. #endif
  31.  
  32. #ifndef INTUITION_SCREENS_H
  33. #include <intuition/screens.h>
  34. #endif
  35.  
  36. #ifndef INTUITION_CLASSUSR_H
  37. #include <intuition/classusr.h>
  38. #endif
  39.  
  40. #ifndef DO_DOS_H
  41. #include <dos/dos.h>
  42. #endif
  43.  
  44. #ifndef UTILITY_TAGITEM_H
  45. #include <utility/tagitem.h>
  46. #endif
  47.  
  48. #ifndef APSH_TOOL_ID
  49. #define    APSH_TOOL_ID 11000L
  50. #define    StartupMsgID        (APSH_TOOL_ID+1L)    /* Startup message */
  51. #define    LoginToolID        (APSH_TOOL_ID+2L)    /* Login a tool SIPC port */
  52. #define    LogoutToolID        (APSH_TOOL_ID+3L)    /* Logout a tool SIPC port */
  53. #define    ShutdownMsgID        (APSH_TOOL_ID+4L)    /* Shutdown message */
  54. #define    ActivateToolID        (APSH_TOOL_ID+5L)    /* Activate tool */
  55. #define    DeactivateToolID    (APSH_TOOL_ID+6L)    /* Deactivate tool */
  56. #define    ActiveToolID        (APSH_TOOL_ID+7L)    /* Tool Active */
  57. #define    InactiveToolID        (APSH_TOOL_ID+8L)    /* Tool Inactive */
  58. #define    ToolStatusID        (APSH_TOOL_ID+9L)    /* Status message */
  59. #define    ToolCmdID        (APSH_TOOL_ID+10L)    /* Tool command message */
  60. #define    ToolCmdReplyID        (APSH_TOOL_ID+11L)    /* Reply to tool command */
  61. #define    ShutdownToolID        (APSH_TOOL_ID+12L)    /* Shutdown tool */
  62. #endif
  63.  
  64. /* Attributes accepted by GetAmigaGuideAttr() */
  65. #define    AGA_Dummy        (TAG_USER)
  66. #define    AGA_Path        (AGA_Dummy + 1)
  67. #define    AGA_XRefList        (AGA_Dummy + 2)
  68. #define    AGA_Activate        (AGA_Dummy + 3)
  69. #define    AGA_Context        (AGA_Dummy + 4)
  70.  
  71. #define    AGA_HelpGroup        (AGA_Dummy + 5)
  72.     /* (ULONG) Unique identifier */
  73.  
  74. typedef void *AMIGAGUIDECONTEXT;
  75.  
  76. struct AmigaGuideMsg
  77. {
  78.     struct Message     agm_Msg;            /* Embedded Exec message structure */
  79.     ULONG         agm_Type;            /* Type of message */
  80.     APTR         agm_Data;            /* Pointer to message data */
  81.     ULONG         agm_DSize;            /* Size of message data */
  82.     ULONG         agm_DType;            /* Type of message data */
  83.     ULONG         agm_Pri_Ret;            /* Primary return value */
  84.     ULONG         agm_Sec_Ret;            /* Secondary return value */
  85.     APTR         agm_System1;
  86.     APTR         agm_System2;
  87. };
  88.  
  89. /* Allocation description structure */
  90. struct NewAmigaGuide
  91. {
  92.     BPTR         nag_Lock;            /* Lock on the document directory */
  93.     STRPTR         nag_Name;            /* Name of document file */
  94.     struct Screen    *nag_Screen;            /* Screen to place windows within */
  95.     STRPTR         nag_PubScreen;            /* Public screen name to open on */
  96.     STRPTR         nag_HostPort;            /* Application's ARexx port name */
  97.     STRPTR         nag_ClientPort;        /* Name to assign to the clients ARexx port */
  98.     STRPTR         nag_BaseName;            /* Base name of the application */
  99.     ULONG         nag_Flags;            /* Flags */
  100.     STRPTR        *nag_Context;            /* NULL terminated context table */
  101.     STRPTR         nag_Node;            /* Node to align on first (defaults to Main) */
  102.     LONG         nag_Line;            /* Line to align on */
  103.     struct TagItem    *nag_Extens;            /* Tag array extension */
  104.     VOID        *nag_Client;            /* Private! MUST be NULL */
  105. };
  106.  
  107. /* public Client flags */
  108. #define    HTF_LOAD_INDEX        (1L<<0)            /* Force load the index at init time */
  109. #define    HTF_LOAD_ALL        (1L<<1)            /* Force load the entire database at init */
  110. #define    HTF_CACHE_NODE        (1L<<2)            /* Cache each node as visited */
  111. #define    HTF_CACHE_DB        (1L<<3)            /* Keep the buffers around until expunge */
  112. #define    HTF_UNIQUE        (1L<<15)        /* Unique ARexx port name */
  113. #define    HTF_NOACTIVATE        (1L<<16)        /* Don't activate window */
  114.  
  115. #define    HTFC_SYSGADS        0x80000000
  116.  
  117. /* Callback function ID's */
  118. #define    HTH_OPEN        0
  119. #define    HTH_CLOSE        1
  120.  
  121. #define    HTERR_NOT_ENOUGH_MEMORY        100L
  122. #define    HTERR_CANT_OPEN_DATABASE    101L
  123. #define    HTERR_CANT_FIND_NODE        102L
  124. #define    HTERR_CANT_OPEN_NODE        103L
  125. #define    HTERR_CANT_OPEN_WINDOW        104L
  126. #define    HTERR_INVALID_COMMAND        105L
  127. #define    HTERR_CANT_COMPLETE        106L
  128. #define    HTERR_PORT_CLOSED        107L
  129. #define    HTERR_CANT_CREATE_PORT        108L
  130. #define    HTERR_KEYWORD_NOT_FOUND        113L
  131.  
  132. typedef struct AmigaGuideHost *AMIGAGUIDEHOST;
  133.  
  134. /* Cross reference node */
  135. struct XRef
  136. {
  137.     struct Node         xr_Node;            /* Embedded node */
  138.     UWORD         xr_Pad;            /* Padding */
  139.     struct DocFile    *xr_DF;                /* Document defined in */
  140.     STRPTR         xr_File;            /* Name of document file */
  141.     STRPTR         xr_Name;            /* Name of item */
  142.     LONG         xr_Line;            /* Line defined at */
  143. };
  144.  
  145. #define    XRSIZE    (sizeof (struct XRef))
  146.  
  147. /* Types of cross reference nodes */
  148. #define    XR_GENERIC    0
  149. #define    XR_FUNCTION    1
  150. #define    XR_COMMAND    2
  151. #define    XR_INCLUDE    3
  152. #define    XR_MACRO    4
  153. #define    XR_STRUCT    5
  154. #define    XR_FIELD    6
  155. #define    XR_TYPEDEF    7
  156. #define    XR_DEFINE    8
  157.  
  158. /* Callback handle */
  159. struct AmigaGuideHost
  160. {
  161.     struct Hook         agh_Dispatcher;        /* Dispatcher */
  162.     ULONG         agh_Reserved;            /* Must be 0 */
  163.     ULONG         agh_Flags;
  164.     ULONG         agh_UseCnt;            /* Number of open nodes */
  165.     APTR         agh_SystemData;        /* Reserved for system use */
  166.     APTR         agh_UserData;            /* Anything you want... */
  167. };
  168.  
  169. /* Methods */
  170. #define    HM_FINDNODE    1
  171. #define    HM_OPENNODE    2
  172. #define    HM_CLOSENODE    3
  173. #define    HM_EXPUNGE    10        /* Expunge DataBase */
  174.  
  175. /* HM_FINDNODE */
  176. struct opFindHost
  177. {
  178.     ULONG MethodID;
  179.     struct TagItem *ofh_Attrs;        /*  R: Additional attributes */
  180.     STRPTR ofh_Node;            /*  R: Name of node */
  181.     STRPTR ofh_TOC;            /*  W: Table of Contents */
  182.     STRPTR ofh_Title;            /*  W: Title to give to the node */
  183.     STRPTR ofh_Next;            /*  W: Next node to browse to */
  184.     STRPTR ofh_Prev;            /*  W: Previous node to browse to */
  185. };
  186.  
  187. /* HM_OPENNODE, HM_CLOSENODE */
  188. struct opNodeIO
  189. {
  190.     ULONG MethodID;
  191.     struct TagItem *onm_Attrs;        /*  R: Additional attributes */
  192.     STRPTR onm_Node;            /*  R: Node name and arguments */
  193.     STRPTR onm_FileName;        /*  W: File name buffer */
  194.     STRPTR onm_DocBuffer;        /*  W: Node buffer */
  195.     ULONG onm_BuffLen;            /*  W: Size of buffer */
  196.     ULONG onm_Flags;            /* RW: Control flags */
  197. };
  198.  
  199. /* onm_Flags */
  200. #define    HTNF_KEEP    (1L<<0)    /* Don't flush this node until database is
  201.                  * closed. */
  202. #define    HTNF_RESERVED1    (1L<<1)    /* Reserved for system use */
  203. #define    HTNF_RESERVED2    (1L<<2)    /* Reserved for system use */
  204. #define    HTNF_ASCII    (1L<<3)    /* Node is straight ASCII */
  205. #define    HTNF_RESERVED3    (1L<<4)    /* Reserved for system use */
  206. #define    HTNF_CLEAN    (1L<<5)    /* Remove the node from the database */
  207. #define    HTNF_DONE    (1L<<6)    /* Done with node */
  208.  
  209. /* onm_Attrs */
  210. #define    HTNA_Screen    (TAG_USER + 1)    /* Screen that window resides in */
  211. #define    HTNA_Pens    (TAG_USER + 2)    /* Pen array (from DrawInfo) */
  212. #define    HTNA_Rectangle    (TAG_USER + 3)    /* Window box */
  213.  
  214.  
  215. /* HM_EXPUNGE */
  216. struct opExpungeNode
  217. {
  218.     ULONG MethodID;
  219.     struct TagItem *oen_Attrs;        /*  R: Additional attributes */
  220. };
  221.  
  222. #endif /* LIBRARIES_AMIGAGUIDE_H */
  223.